Managing phys of a data storage target device

ABSTRACT

Embodiments of the present disclosure generally relate to managing phys of a data storage target device. In one embodiment, a method of managing phys of a data storage target device includes waiting to receive a host address on a target phy and transmitting a target phy address for the target phy after waiting to receive the host address on the target phy. In another embodiment, a method of managing phys of a data storage target device includes configuring a target port comprising a first target phy and reconfiguring the target port comprising a first target phy and a second target phy.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

Embodiments of the present disclosure generally relate to managing physof a data storage target device.

Description of the Related Art

Host computing devices communicate with a target, such as a data storagedevice, through a port on the target. The target port includes one ormore physical layers, which are known as phys. The physical layers arecircuitry implementing the physical layer functions. With data storagedevices using a SAS interface protocol, a narrow target port has asingle phy while a wide target port has two or more phys. The targetphys physically couple to other host phys through a physical link, suchas a cable or optical fiber. The phys perform various functions usingsignals received and transmitted over the physical link for the port.

Target phy SAS addresses are typically manually configured via a vendormode setting or a unique firmware for a particular user mandatedconfiguration. The target phy SAS addresses are pre-defined to operatein a narrow port configuration or a wide port configuration. Modesetting or unique firmware approaches require manual intervention with anewly selected mode setting or a new firmware to update a change in thetarget configuration, such as when the target is moved between systems,when cabling changes occur to the target, or when an expander coupled tothe target undergo a configuration change. Thus, manual interventionstatically provides wide port configuration.

It is desirable for the target phys to be grouped in a wide port forimproved link failure tolerance, for optimized data transfers, and forimproved power management of the target phys. However, the SAS protocoldoes not provide a defined mechanism for how wide port links should beestablished on target phys. Hosts typically manage wide portconfigurations at initial power-on or boot time by presenting the targetwith common SAS addresses on each phy that host would like to configurein a wide port. If a target responds with a common SAS address on thosephys as set by manual intervention, a wide port is established. If atarget responds with different SAS addresses on those phys as pertypical default settings, narrow ports are established.

Targets do not know which phys the host may attempt to group into a wideport. The host does not have any visibility to the target's phy priorusage or selection in a wide port. Therefore, there is a need forimproved management of target phys into wide ports.

SUMMARY OF THE DISCLOSURE

Embodiments of the present disclosure generally relate to managing physof a data storage target device.

In one embodiment, a method of automatically managing phys of a datastorage target device by a controller of the data storage device acrossa link reset includes transmitting a common target phy address for aplurality of target phys during a first link reset, storing the commontarget phy address in a non-volatile memory of the data storage device,resetting the target phys, and transmitting the stored common target phyaddress for the plurality of target phys during a second link reset.

In one embodiment, a data storage device includes a controller, aplurality of phys, a non-volatile memory containing a lookup table, anda non-transitory computer readable storage medium containinginstructions. The instructions when executed by the controller cause thecontroller to transmit a common phy address for the phys, store thecommon phy address in the lookup table, reset the phys, and transmit thestored common phy address. In another embodiment, the data storagedevice includes a controller, a port, a plurality of phys, and a meansfor automatically configuring the port into a wide port.

In another embodiment, a method of automatically managing phys of a datastorage target device by a controller of the data storage deviceincludes matching a received host address on a plurality of target physand configuring the plurality of target phys into a wide port for theplurality of target phys with the matching received host address.

In another embodiment, a data storage device includes a controller, oneor more ports, a plurality of phys, and a non-transitory computerreadable storage medium containing instructions. The instructions whenexecuted by the controller cause the controller to receive a setting fora maximum phy limit configured into a common port and configure theplurality of phys into the one or more ports without exceeding thesetting of the maximum phy limit. In yet another embodiment, a datastorage device includes a controller, one or more ports, a plurality ofphys, and a means for configuring the plurality of phys into at least awide port for phys having a matching received host address.

In still another embodiment, a method of managing phys of a data storagetarget device includes waiting to receive a host address on a target phyand transmitting a target phy address for the target phy after waitingto receive the host address on the target phy.

In still another embodiment, a data storage device includes acontroller, a first phy and a second phy, a non-transitory computerreadable storage medium containing instructions. The instructions whenexecuted by the controller cause the controller to wait to receive ahost address on the first phy and transmit a phy address for the firstphy after waiting to receive the host address on the first phy. In oneembodiment, a data storage device includes a controller, a plurality ofphys, and a means for determining a phy address to transmit during a SASidentification window to configure the phys into a wide portconfiguration.

In one embodiment, a method of managing phys of a data storage targetdevice includes configuring a target port comprising a first target phyand reconfiguring the target port comprising a first target phy and asecond target phy.

In one embodiment, a data storage device includes a controller, a firstphy and a second phy, a port, and a non-transitory computer readablestorage medium containing instructions. The instructions when executedby the controller cause the controller to configure the port to comprisethe first phy and reconfigure the port to comprise the first phy and thesecond phy. In still another embodiment, a data storage device includesa controller, one or more ports, a plurality of phys, and a means forconfiguring the plurality of phys into a configuration. Theconfiguration selected from the group consisting of one of thefollowing: (1) four narrow ports, (2) two narrow ports and one wideport, (3) one narrow and one wide port, (4) two wide ports, and (5) onewide port.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentdisclosure can be understood in detail, a more particular description ofthe disclosure, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this disclosure and are therefore not to beconsidered limiting of its scope, for the disclosure may admit to otherequally effective embodiments.

FIG. 1 is a schematic illustration of a system according to oneembodiment.

FIG. 2 is a flowchart showing management of various phys of a targetaccording to one embodiment.

FIGS. 3A-3E are tables illustrating the target phy management accordingto Example 1.

FIGS. 4A-4D are tables illustrating the target phy management accordingto Example 2.

FIGS. 5A-5D are tables illustrating the target phy management accordingto Example 3.

To facilitate understanding, identical reference numerals have beenused, where possible, to designate identical elements that are common tothe figures. It is contemplated that elements disclosed in oneembodiment may be beneficially utilized on other embodiments withoutspecific recitation.

DETAILED DESCRIPTION

In the following, reference is made to embodiments of the disclosure.However, it should be understood that the disclosure is not limited tospecific described embodiments. Instead, any combination of thefollowing features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thedisclosure. Furthermore, although embodiments of the disclosure mayachieve advantages over other possible solutions and/or over the priorart, whether or not a particular advantage is achieved by a givenembodiment is not limiting of the disclosure. Thus, the followingaspects, features, embodiments and advantages are merely illustrativeand are not considered elements or limitations of the appended claimsexcept where explicitly recited in a claim(s). Likewise, reference to“the disclosure” shall not be construed as a generalization of anyinventive subject matter disclosed herein and shall not be considered tobe an element or limitation of the appended claims except whereexplicitly recited in the claim(s).

Embodiments of the present disclosure generally relate to portauto-configuration. More particularly, embodiments of the presentdisclosure relate to auto-configuration of target phys into narrow portsand/or wide ports.

FIG. 1 is a schematic illustration of a system 100 according to oneembodiment. The system 100 includes one or more initiators or hosts 150and one or more target devices 102, such as a data storage device, forthe host 150 as shown. The host 150 may utilize non-volatile memory(NVM) 106 included in target device 102 to store and retrieve data.

Host 150 may include a wide range of devices, such as computer servers,network attached storage (NAS) units, desktop computers, notebook (i.e.,laptop) computers, tablet computers (i.e., “smart” pad), set-top boxes,telephone handsets (i.e., “smart” phones), televisions, cameras, displaydevices, digital media players, video gaming consoles, and videostreaming devices. In certain embodiments, host 150 includes any devicehaving a processing unit or any form of hardware capable of processingdata, including a general purpose processing unit (such as a centralprocessing unit (CPU)), dedicated hardware (such as an applicationspecific integrated circuit (ASIC)), configurable hardware such as afield programmable gate array (FPGA), or any other form of processingunit configured by software instructions, microcode, or firmware.

NVM 106 of target device 102 may be configured for long-term storage ofinformation as non-volatile memory space and retain information afterpower on/off cycles. Examples of non-volatile memory include flashmemories, phase change memories, ReRAM memories, MRAM memories, magneticmedia (including shingle magnetic recording), optical disks, floppydisks, electrically programmable read only memories (EPROM),electrically erasable programmable read only memories (EEPROM), andother solid-state memories. Magnetic media non-volatile memory may beone or more magnetic platters in target device 102. Each platter maycontain one or more regions of one or more tracks of data.

Target device 102 may include a hardware engine 114 interfacing with theNVM 106. When target device 102 is a solid-state drive, hardware engine114 may be logic engines controlling read and write operations to NVM106. When target device 102 is a hard disk drive, hardware engine 114may be magnetic read/write heads and accompanying hardware to configure,drive, and process the signals sensed by the magnetic read/write head.

Target device 102 may include a volatile memory 112 for short-termstorage or temporary memory during operation of target device 102.Volatile memory 112 does not retain stored data if powered off. Examplesof volatile memories include random access memories (RAM), dynamicrandom access memories (DRAM), static random access memories (SRAM), andother forms of volatile memories.

Target device 102 may include a controller 110, which may manage one ormore operations of target device 102. Controller 110 may interface withhost 150 via one or more target ports 108 and manage the storage of datato and the retrieval of data from NVM 106 via hardware engine 114. Forexample, controller 110 may manage writes to and reads from NVM 106 andvolatile memory 112. Controller may include a memory manager 118 thatmanages the memory allocation between NVM 106 and volatile memory 112.Controller 110 may include any combination of software, hardware, and/orfirmware.

For ease of illustration purposes, target device 102 includes additionalcomponents not shown in FIG. 1. For example, target device 102 mayinclude power delivery components, such as a battery, a capacitor, orsuper capacitor. Target device 102 may include a printed circuit board(PCB) mechanically attaching components of target device 102 withelectrically conductive traces that electrically interconnect componentsof target device 102.

Target device 102 may include any form factor and any enclosure. In someexamples, the physical dimensions and connector configurations of targetdevice 102 may conform to one or more standard form factors. Someexample standard form factors include, but are not limited to, 3.5″solid-state drive (SSD) or hard disk drive (HDD), 2.5″ SDD or HDD, or1.8″ SSD or HDD.

Target device 102 may execute non-transitory, computer-readable medium140 that stores code or instructions for operating target device. Thenon-transitory, computer-readable medium 140 may be included in NVM 106or firmware of the target device 102.

Target device 102 may include one or more physical connections116A-116N, also known as phy (singular) or phys (plural). Host 150 mayinclude one or more phys 168A-168N. Each phy may include transmittersand receivers for communication with phys of other devices. For example,target phys 116A-116N of target device 102 may be configured tocommunicate with the host phys 168A-168N of host 150 over one or morecommunication links 190 or over one or more expanders (not shown). Incertain embodiments, target device 102 may include four phys 116A-116D.In still other examples, target device 102 may include more than fourphys 116A-116N.

Target phys 116A-116N may be configured into one or more target ports108, and host phys 168A-168N may be configured into one or more hostports 170. Target ports 108 and host ports 170 may include one or morebuses for exchanging data and exchanging operations. Target port 108 viatarget phys 116A-116N may be configured to receive and transmit signalsassociated with an operation to be performed by the target phys116A-116N. Examples of operations that may be performed by target phys116A-116N include a write operation, a read operation, a data transfer,or a data deletion, among other things.

A single target phy 116 configured into a single port is a narrow port.Two or more target phys 116A-116N configured into a single port is awide port. The target ports 108 of target device 102 may be configuredto communicate with host 150 in a number of configurations. For example,for target device 102 having four phys 116A-116D, the target ports 108may be configured into the following narrow-wide port configurations:(i) four narrow ports, each having one target phy; (ii) two narrowports, each having one target phy, and one wide port having two targetphys; (iii) one narrow port having one target phy and one wide porthaving three target phys; (iv) two wide ports, each having two targetphys; and (v) one wide port having four target phys.

In general, the narrow-wide port configuration of the target ports 108and the host ports 170 are independent of each other. The target ports108 of target device 102 may be configured in various narrow-wide portconfigurations while the host ports 170 of host 150 may be configured indiffering narrow-wide port configurations.

Target phys 116A-116N are electrically connected to controller 110allowing data to be exchanged between host 150 and controller 110.Target phys 116A-116N are a part of the controller 110 and partitionedas a sub-block for internal logic of the controller 110, but, for easeof illustration, have been shown as elements connected to thecontroller. In some examples, the electrical connection of target port108 through one or more target phys 116A-116N may permit target device102 to receive power from host 150.

Target ports 108 of target device 102 may operate in accordance with anysuitable protocol. In certain embodiments, target ports 108 operatefollowing the serially attached SCSI (SAS) interface protocol. In otherembodiments, the target ports 108 may operate in accordance with one ormore of the interface protocols, such as serially attached SCSI (SAS),advanced technology attachment (ATA) (e.g., serial-ATA (SATA),parallel-ATA (PATA)), Fibre Channel Arbitrated Loop (FCAL), smallcomputer system interface (SCSI), peripheral component interconnect(PCI), PCI-express (PCIe), and non-volatile memory express (NVMe)protocols.

FIG. 2 is a flowchart 250 showing management of various target phys of atarget device according to one embodiment. For illustration purposes,embodiments will be described on target device 102 comprising a memorystorage device having four target phys 116A-116D coupled to host 150through a communications link 190 as shown in FIG. 1. Embodiments ofmanagement of various phys may be used on other target devices and othermemory storage devices besides the system as shown in FIG. 1. Forexample, embodiments of management of various target phys of a targetdevice may be used on a target memory storage device having two targetphys or having more than four target phys.

At block 200, a link is already established between target device 102and host 150. Target phy SAS addresses of target phys 116A-116D used inthe link with the host 150 are stored in NVM 106 by the firmware orhardware of target device 102. These stored target phy SAS addresses arecalled last target phy SAS addresses.

At block 201, target device 102 performs a target phy reset sequence,such as a target phy reset sequence under the SAS protocol. Target phyreset sequence may be performed on a power on, a hard reset, ormanagement reset of target device 102, such as when target device 102 ismoved between systems, when cabling changes occur to target device 102,when an expander (not shown) coupled to target device (102) undergoes aconfiguration change, or when other updates to the system occur. Duringa phy reset sequence, out of band (00B) signals are exchanged betweenhost 150 and target device 102 to establish a commonly supported speedand to establish the communication protocol. Each target phy 116 maycomplete the target phy reset sequence at different times and atdifferent orders.

At block 202, for the target phy 116 that has completed the phy reset,target device 102 initializes a target identify frame to be transmittedto host 150 with the default target phy SAS address for that particulartarget phy. An identify frame includes a SAS address and a phyidentifier to create a link between a target phy 116 and a host phy 168.Target device 102 may continue to perform a target phy reset of theother target phys 116 while target device 102 performs theidentification sequence for the target phy 116 that has completed thetarget phy reset.

At block 203, target device 102 checks a configuration mode settingenabling automatic configuration of target phys 116A-116D into wide portconfiguration when there is a wide port opportunity. The configurationmode setting is the desired maximum number of target phys 116A-116D in acommon target port 108. For illustration purposes, this mode setting maybe named maximum phy auto wide port configuration (MPAWPC) mode setting.For example, when the MPAWPC setting is one, target device 102 may onlyassign one target phy 116 for a common target port 108. Therefore, eachtarget phy operates in a narrow port configuration. When the MPAWPCsetting is two, target device 102 may assign a maximum of two targetphys (i.e., two or less) for a common target port 108. When the MPAWPCsetting is three, target device 102 may assign a maximum of three targetphys (i.e., three or less) for a common target port 108. When the MPAWPCsetting is four, target device 102 may assign a maximum of four targetphys (i.e., four or less) for a common target port 108. If target device102 has more than four target phys 116A-116N, the MPAWPC setting may bemore than four as well as one, two, three, or four. The MPAWPC settingmay be selected from a host mode page control command provided by thehost 150 to target device 102.

When the MPAWPC setting is one, auto configuration of the target phys116A-116D into wide ports is disabled. At block 211, target device 102transmits the target identify frame with the default target SAS identifyaddress provided at block 202. After the target device 102 receives thehost identify SAS address, the identification sequence completes on thetarget phy 116 and a link is established with host 150 in which thetarget phy is in a default port configuration.

When the MPAWC setting is greater than one, target device 102automatically determines opportunities to group target phys 116A-116Dinto common target port(s) 108 for wide port configuration. Therefore,when MPAWPC setting is two or more, auto-configuration of the targetphys 116A-116D of target device 102 into wide ports is enabled.

At block 204, target device 102 updates the target identify frame to betransmitted with the last target phy SAS address from block 200.

At block 205, target device 102 waits or withholds the target identifyframe for this particular target phy until the host identify frame isreceived or until a certain amount of the time out window (such as 80%of the time out window). Target device 102 waits or withholds the targetidentify frame to receive the host identify frame so that the targetdevice 102 may adjust target phys 116A-116D into a wide portconfiguration if there is a wide port opportunity.

At block 205, when target device 102 does not receive the host identifyframe prior to a timeout window of an identification sequence under theSAS protocol, target device 102 transmits at block 211 the targetidentify frame with the last target phy SAS address provided at block204. This particular target phy completes the link reset after receivinga host identify SAS address and is configured in a narrow portconfiguration or in a wide port configuration depending on whether alink reset has been completed on other target phy with the same targetphy SAS address. The target phy may be configured into a narrow port ifthe last target address configured the target phy into a narrow port.The target phy may be configured into a wide port if the last targetaddress configured the target phy into a wide port and the host addressdid not change from that last configuration (e.g. host transmits sameSAS address as before that completed the wide port configuration). Thisparticular target phy may be later re-configured from a narrow port intoa wide port or from a wide port to another wide port having additionaltarget phy(s) by updating the target identify frame of other target physprocessed under the management flow described in flow chart 250.

At block 205, when target device 102 receives the host identify frameprior to a timeout window of the identification sequence, target device102 proceeds to block 206. At block 206, target device 102 searches aphy SAS address lookup table for a matching received host identify SASaddress presented on other target phys. If there are more than onematching received host identify SAS address, target device 102 mayconduct an additional search using additional criteria to determineoptimal mapping. For example, target device 102 may search for matcheson the last target phy SAS address.

At block 207, (i) when target device 102 does not find a matching hostidentify SAS addresses for the particular target phy 116 with anothertarget phy or (ii) when grouping the particular target phy 116 into awide port will exceed the MPAWPC setting, target device 102 proceeds toblock 209 in which the target identify frame is updated with the defaulttarget SAS address for that particular target phy. At block 210, targetdevice 102 updates the phy SAS address lookup table with the receivedhost identify SAS addresses and the last target SAS address for thatparticular target phy 116. Transmission of this identify frame at block211 configures this particular target phy 116 into a default portconfiguration. This particular target phy 116 may be later re-configuredby updating the target identify frame of other target phys processedunder the management flow described in flow chart 250.

At block 207, when target device 102 finds a matching host identify SASaddresses for the particular target phy with another target phy(s)(i.e., matching target phy(s)) and when grouping the particular targetphy with the matching target phy(s) into a wide port will not exceededthe MPAWPC setting, target device 102 proceeds to block 208. At block208, target device 102 updates the target identify frame for thatparticular target phy with the last target phy SAS address for thematching phy(s). At block 210, target device 102 updates the phy SASaddress lookup table with the received host identify SAS addresses andthe last target phy SAS address for the matching phy(s). That particulartarget phy is configured into a wide port with the matching targetphy(s). Therefore, the matching target phy is re-configured from anarrow port to a wide port with the particular target phy or thematching target phy(s) is re-configured to expand a prior wide port toinclude that particular target phy.

At block 211, target device 102 transmits the target identify frame forthat particular target phy to establish a link between target device 102and host 150. Each of the target phys 116A-116D may proceed through thetarget management flow as shown in flow chart 250 until each of thetarget phys 116-116D transmits its target phy SAS identify address inblock 211 to complete the link sequence.

The management flow may proceed back to block 200 to store target phySAS addresses of target phys 116A-116D as last target phy SAS addressesin NVM 106 of the target device 102. These last target phy SAS addressmay be used for configuration or re-configuration of the target phys116A-116D as other target phys 116A-116D complete the link sequence oron other target phy resets.

The description of FIG. 2 illustrates one management flow. Other processflows are possible. For example, certain blocks in flowchart 250 may beoptional or may be redundant. In other examples, certain blocks inflowchart 250 may be ordered in different sequences. In other examples,certain blocks in flowchart 250 may be separated into two or moreblocks. In other examples, certain blocks in flowchart 250 may becombined.

EXAMPLES

The following are examples to illustrate various embodiments of theinvention performing various embodiments of the target phy managementflow as described in flowchart 250 in FIG. 2 as well as alternativeembodiments. For illustration purposes, these examples will be describedon a target device comprising a memory storage device having four targetphys, such as target device 102 described in FIG. 1. Such examples arenot meant to limit the scope of the invention unless specifically setforth in the claims.

Example 1

In Example 1, a mode setting MPAWPC value is set at four so that atarget wide port may contain a maximum of four target phys.

Table 300 in FIG. 3A shows the initial state of the target phy SASaddress lookup table prior to any target phys completing link resetsequence. Phy port mapping and SAS addresses are configured based onport configuration mode setting and the default target phy SASaddresses. In this example, the port configuration mode provides fourseparate unique default target SAS address 311, 312, 313, 314 for eachtarget phy to use in a default narrow port configuration.

As shown in phy SAS address lookup table 300 in FIG. 3B, the targetdevice completes link reset sequence on target phy 0. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is four, wide port auto-configuration is enabled.Target device waits to receive a host phy SAS address 321 on target phy0 prior to transmitting an identify frame. The host received phy SASaddress 321 is recorded in the lookup table. Target device searches fora matching or common host SAS address. Since no other host SAS addresshave been received yet, no matching or common host SAS address is found.Target device transmits an identify frame using default target phy SASaddress 311 to establish a default port (which is a default narrow portin this example) on target phy 0. The SAS link reset sequence completeson target phy 0. The last target phy SAS address 331 for target phy 0 isupdated with the value used in the transmitted identify SAS address andis stored in non-volatile memory.

As shown in phy SAS address lookup table in FIG. 3C, the target devicecompletes link reset sequence on target phy 1. Target device checkswhether wide port auto-configuration is enabled. In this example, sincethe MPAWPC is four, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 322 on target phy 1 priorto transmitting an identify frame. The host received phy SAS address 322is recorded in the lookup table. Target device searches for a matchingor common host SAS address. Since host received phy SAS address 322 ontarget phy 1 does not match the host received SAS address 321 on targetphy 0 and is an unique address, there is no opportunity for a targetwide port. Target device transmits an identify frame using the defaulttarget phy SAS address 312 to establish a narrow port on target phy 1.The SAS link reset sequence completes on phy 1. The last target phy SASaddress 332 for target phy 1 is updated with the value used in thetransmitted identify SAS address and is stored in non-volatile memory.

As shown in phy SAS address lookup table in FIG. 3D, the target devicecompletes link reset sequence on target phy 2. Target device checkswhether wide port auto-configuration is enabled. In this example, sincethe MPAWPC is four, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 323 on target phy 2 priorto transmitting an identify frame. The host received phy SAS address 323is recorded in the lookup table. Target device searches for a matchingor common host SAS address. During host SAS address lookup, a matchingcommon SAS address 321, 323 is found on target phy 0 and target phy 2.Since configuring target phy 0 and target phy 2 into a wide port willnot exceed the MPAWPC setting, target device establishes a wide portwith target phy 0 and target phy 2 by updating the identify SAS addressfor target phy 2 with the last target phy SAS address 331 used fortarget phy 0. Target device transmits the updated identify frame, andthe SAS link reset sequence completes on phy 2. Wide port is establishedbetween target phy 0 and target phy 2 dynamically. The last target phySAS address 333 for target phy 2 is updated with the value used in thetransmitted identify SAS address and is stored in non-volatile memory.

As shown in phy SAS address lookup table 300 in FIG. 3E, the targetdevice completes link reset sequence on target phy 3. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is four, wide port auto-configuration is enabled.Target device waits to receive a host phy SAS address 324 on target phy3 prior to transmitting an identify frame. The host received phy SASaddress 324 is recorded in the lookup table. Target device searches fora matching or common host SAS address. During host SAS address lookup, amatching common SAS address 321, 323, 324 is found on target phy 0,target phy 2, and target phy 3. Since configuring target phy 0, targetphy 2, and phy 3 into a wide port will not exceed the MPAWPC setting,target device establishes a wide port with target phy 0, target phy 2,and target phy 3 by updating the identify SAS address for target phy 3with the last target phy SAS address 331, 333 used for target phy 0 andfor target phy 2. Target device transmits the updated identify frame,and the SAS link reset sequence completes on phy 3. Wide port isestablished between target phy 0, target phy 2, and target phy 3dynamically. The last target phy SAS address 334 for target phy 3 isupdated with the value used in the transmitted identify SAS address andis stored in non-volatile memory.

Example 2

In Example 2, a mode setting MPAWPC value is set at two so that a targetwide port may contain a maximum of two target phys.

As shown in phy SAS address lookup table 400 in FIG. 4A, a target devicecompletes link reset sequence on target phy 0. Phy port mapping and SASaddresses are configured based on port configuration mode setting andthe default target phy SAS addresses. In this example, the portconfiguration mode provides four separate unique target SAS address 411,412, 413, 414 for each target phy to use in a default narrow portconfiguration. The target device completes link reset sequence on targetphy 0. Target device checks whether wide port auto-configuration isenabled. In this example, since the MPAWPC is two, wide portauto-configuration is enabled. Target device waits to receive a host phySAS address 421 on target phy 0 prior to transmitting an identify frame.The host received phy SAS address 421 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sinceno other host SAS addresses have been received yet, no matching orcommon host SAS address is found. Target device transmits an identifyframe using default target phy SAS address 411 to establish a defaultport (which is a default narrow port in this example) on target phy 0.The SAS link reset sequence completes on target phy 0. The last targetphy SAS address 431 for target phy 0 is updated with the value used inthe transmitted identify SAS address and is stored in non-volatilememory.

As shown in phy SAS address lookup table 400 in FIG. 4B, the targetdevice completes link reset sequence on target phy 1. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 422 on target phy 1. Thehost received phy SAS address 422 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sincehost received phy SAS address 422 on target phy 1 matches the hostreceived SAS address 421 on target phy 0, there is an opportunity for atarget wide port. Since configuring target phy 0 and target phy 1 into awide port will not exceed the MPAWPC setting of two, target deviceestablishes a wide port with target phy 0 and target phy 1 by updatingthe identify SAS address for target phy 1 with the last target phy SASaddress 431 used for target phy 0. Target device transmits the updatedidentify frame, and the SAS link reset sequence completes on phy 1. Wideport is established between target phy 0 and target phy 1 dynamically.The last target phy SAS address 432 for target phy 1 is updated with thevalue used in the transmitted identify SAS address and is stored innon-volatile memory.

As shown in phy SAS address lookup table 400 in FIG. 4C, the targetdevice completes link reset sequence on target phy 2. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 423 on target phy 2. Thehost received phy SAS address 423 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sincehost received phy SAS address 423 on target phy 2 matches the hostreceived SAS address 421, 422 on target phy 0 and for target phy 1,there is an opportunity for an expanded target wide port. However, sinceconfiguring target phy 0, target phy 1, and target phy 2 into a wideport will exceed the MPAWPC setting of two, target device transmits anidentify frame using default target SAS 413 to establish a narrow porton target phy 2. The SAS link reset sequence completes on phy 2. Thelast target phy SAS address 433 for target phy 2 is updated with thevalue used in the transmitted identify SAS address and is stored innon-volatile memory.

As shown in phy SAS address lookup table 400 in FIG. 4D, the targetdevice completes link reset sequence on target phy 3. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive phy SAS address 424 on target phy 3. The hostreceived phy SAS address 424 is recorded in the lookup table. Targetdevice searches for a matching or common host SAS address. During hostSAS address lookup, a matching common SAS address 421, 422, 423, 424 isfound on target phy 0, target phy 1, target phy 2, and target phy 3.Since configuring target phy 0, target phy 1, and target phy 3 into awide port will exceed the MPAWPC setting of two, target devicedetermines if there are other wide port opportunities with other targetphys. Since configuring target phy 2 and target phy 3 into a wide portwill not exceed the MPAWPC setting of two, target device establishes awide port with target phy 2 and target phy 3 by updating the identifySAS address for target phy 3 with the last target phy SAS address 433used for target phy 2. Target device transmits an identify frame, andthe SAS link reset sequence completes on target phy 3. Wide port isestablished between target phy 2 and target phy 3 dynamically. The lasttarget phy SAS address 434 for target phy 3 is updated with the valueused in the transmitted identify SAS address and is stored innon-volatile memory.

Target device has now auto-configured four target phys into two wideports each with two target phys (i.e., 2×2 configuration).

Example 3

In Example 3, a mode setting MPAWPC value is set at two so that a targetwide port may contain a maximum of two target phys. The target devicehas previously configured phy 0 and phy 1 in a wide port.

The initial state of phy SAS address lookup table 500 in FIG. 5A has thelast target phy SAS addresses 531, 532 initialized for phy 0 and for phy1. Then, FIG. 5A illustrates that a target device completes a link resetsequence on phy 1. Phy port mapping and SAS addresses are configuredbased on the port configuration mode setting and the default target phySAS addresses. In this example, the port configuration mode providesfour separate unique target SAS address 511, 512, 513, 514 for eachtarget phy in a default narrow port configuration. Target devicecompletes link reset sequence on target phy 1. Target device checkswhether wide port auto-configuration is enabled. In this example, sincethe MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 522 on target phy 1. Thehost received phy SAS address 522 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sinceno other host SAS addresses have been received yet, no matching orcommon host SAS address is found. Target device transmits an identifyframe using default target phy SAS address 512 to establish a defaultport (which is a default narrow port in this example) on target phy 1.The SAS link reset sequence completes on target phy 1. The last targetphy SAS address 532 for target phy 1 is updated with the value used inthe transmitted identify SAS address and is stored in non-volatilememory.

As shown in phy SAS address lookup table 500 in FIG. 5B, the targetdevice completes link reset sequence on target phy 3. Target devicechecks whether wide port auto-configuration is enabled. In this example,since the MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 524 on target phy 3. Thehost received phy SAS address 524 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sincehost received phy SAS address 524 on target phy 3 does not match thehost received SAS address 522 on target phy 1 and is a unique address,there is no opportunity for a target wide port. Target device transmitsan identify frame using default target SAS address 514 to establish anarrow port on target phy 3. The SAS link reset sequence completes onphy 3. The last target phy SAS address 534 for target phy 3 is updatedwith the value used in the transmitted identify SAS address and isstored in non-volatile memory.

As shown in phy SAS address lookup table 500 in FIG. 5C, target devicecompletes link reset sequence on target phy 2. Target device checkswhether wide port auto-configuration is enabled. In this example, sincethe MPAWPC is two, wide port auto-configuration is enabled. Targetdevice waits to receive a host phy SAS address 523 on target phy 2. Thehost received phy SAS address 523 is recorded in the lookup table.Target device searches for a matching or common host SAS address. Sincehost received phy SAS address 523 on target phy 2 matches the hostreceived SAS address 524 on target phy 3, there is an opportunity for atarget wide port. Since configuring target phy 2 and target phy 3 into awide port will not exceed the MPAWPC setting of two, target deviceestablishes a wide port with target phy 2 and target phy 3 by updatingthe identify SAS address for target phy 2 with the last target phy SASaddress 534 used for target phy 3. Target device transmits an identifyframe, and the SAS link reset sequence completes on target phy 2. Wideport is established between target phy 2 and target phy 3 dynamically.The last target phy SAS address 533 for target phy 2 is updated with thevalue used in the transmitted identify SAS address and is stored innon-volatile memory.

As shown in phy SAS address lookup table 500 in FIG. 5D, target devicecompletes link reset sequence on target phy 0. Target device checkswhether wide port auto-configuration is enabled. Since the MPAWPC istwo, wide port auto-configuration is enabled. Target device waits for ahost identify frame to be received for a certain amount of the time outwindow (such as 80% of the time out window) but has not yet received thehost identify frame on target phy 0. Since the host SAS address for thetarget phy 0 has not yet been received, the target device transmits anidentify SAS address for target phy 0 with the last target phy SASaddress 531 (in this case the same SAS address of target phy 1) used fortarget phy 0 prior to the target phy reset. Target device receives hostphy SAS address 511. The SAS link reset sequence completes on target phy0. Since the host phy SAS address received on phy 0 matches the host phySAS address received on phy 1, a wide port is established between targetphy 0 and target phy 1 dynamically. The last target phy SAS address 531for target phy 0 is updated with the value used in the transmittedidentify SAS address and is stored in non-volatile memory. In thisexample, the target device transmitted the last target phy SAS addressfor target phy 0 prior to receiving a host identify SAS address andprovided an opportunity to establish a wide port on target phy 0 in theevent that the host identify SAS address would be common with phy 1 whenit was received.

Target device has now auto-configured four target phys into two wideports each with two target phys (i.e., 2×2 configuration).

In certain embodiments, management of various target phys into a wideport configuration occurs dynamically by the target device or datastorage device as described in flowchart 250 of FIG. 2 and in Examples1-3. For example, instead of immediately transmitting a target identifyframe, the target device waits to receive host identify frames, such asat block 205 of flowchart 250, and configures the target phys in a wideport for matching received host identify SAS addresses, such as at block210 of flowchart 250. The target device strategically uses the identifytimeout window during SAS identification sequence to wait to receive thehost SAS identify addresses. Then, the target device makes adjustmentsto the target port configurations.

In certain embodiments, management of various target phy updatesre-configures prior port configurations as described in flowchart 250 ofFIG. 2 and in Examples 1-3. For example, a target phy is re-configuredfrom a narrow port to a wide port as another target phy is presentedwith a common host identify SAS address, or target phys arere-configured to expand a prior wide port to include another target phyas this target phy is presented with a common host identify SAS address.

In certain embodiments, management of various target phys into narrowport or wide port configurations occurs by transmitting consistent SAStarget addresses across power resets or link resets as described inflowchart 250 of FIG. 2 and in Examples 1-3. The last target phy SASaddress is stored persistently in non-volatile memory so that SASaddresses are not recreated in resets. As the target phys are powered upand the links are reset, default target phy SAS addresses can be readiedto be transmitted, but replaced with last target phy SAS address valuesstored in non-volatile memory if there is a wide port opportunity. Incertain embodiments, the target device may automatically reconfigure thetarget into a wide port configuration across resets using the same SAStarget addresses independent of the order that the target phys completeSAS link reset sequence.

In certain embodiments, a mode setting provides the flexibility tospecify the maximum number of target phys in a wide port as described inflowchart 250 of FIG. 2 and in Examples 1-3. For example, for a targetdevice having four target phys in certain instances, a configuration oftwo wide ports each with two target phys (i.e., 2×2 configuration) maybe desirable. Thus, a mode setting of two enables the target device toauto-configure the target phys in a 2×2 configuration when there is anopportunity. In another example, for a target device having four targetphys in certain instances, a configuration of one wide port having fourtarget phys (i.e., 1×4 configuration) may be desirable. Thus, a modesetting of four enables the target device to auto-configure the targetphys in a 1×4 configuration when there is an opportunity.

In certain embodiments, management of various target phys may proceedwith a default setting as described in the flowchart 250 of FIG. 2 andin Examples 1-3. For example, if the mode setting of the desired maximumtarget phys in a port is reached, then the target device may use adefault target phy SAS address, such as at block 209, to configure thetarget phy into a default target port.

In certain embodiments, a target device may dynamically update targetSAS addresses to align with wide port opportunities presented by a hostwithout manual intervention as described in the flowchart 250 of FIG. 2and in Examples 1-3.

In certain embodiments, a target device automatically adapts to systemconfiguration changes as described in the flowchart 250 of FIG. 2 and inExamples 1-3. System configuration changes may occur when target ismoved between systems, when cabling changes occur to the target device,when an expander coupled to the target device undergoes a configurationchange, or when other updates to the system occur. For example, incertain embodiments, it is desirable to have target devices with acommon part number installed in multiple systems. Since the common partnumber target devices can only have one default setting, target devicesmay dynamically adjust wide ports through a mode setting withoutdownloading new code and without any changes to the host.

In certain embodiments, management of various target phys as describedin the flowchart 250 of FIG. 2 and in Examples 1-3 is compliant with SASstandards.

In certain embodiments, management of various target phys as describedin flowchart 250 of FIG. 2 and in Examples 1-3 is compliant withexisting infrastructure (e.g. expanders, enclosures, buses, cabling,etc.) without any additional firmware or hardware changes. In certainembodiments, management of various target phys as described in theflowchart 250 of FIG. 2 and in Examples 1-3 can be implemented withoutadding any additional firmware or hardware.

In certain embodiments, wide port configurations are remembered acrossresets by storing the addresses used in identify frames in non-volatilememory as described in flow chart 250 of FIG. 2 and in Examples 1-3.

Certain embodiments of the disclosure provide one or more of thefollowing aspects. A method and data storage device which automaticallyconfigures the phys of the storage device in a wide port configurationby automatically aligning with host wide port opportunities. A methodand data storage device which allows the storage device to adapt tomoving the data storage device between different connections with ahost. A method and data storage device which is complaint with SASstandards. A method and data storage device which is compatible withexisting infrastructure (i.e., expanders, enclosures, and HBAs). Amethod and data storage device which remembers wide port configurationsacross boot/power resets. A method and data storage device with theability to auto-configure the maximum number phys per wide port.

While the foregoing is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A method of managing phys of a data storage target device, comprising: waiting to receive a host address on a target phy; and transmitting a target phy address for the target phy after waiting to receive the host address on the target phy.
 2. The method of claim 1, further comprising receiving the host address on the target phy prior to transmitting the target phy address for the target phy.
 3. The method of claim 2, further comprising matching the received host address with a received host address on another target phy.
 4. The method of claim 1, wherein transmitting the target phy address for the target phy comprises transmitting a common target phy address for the target phy and for another target phy.
 5. The method of claim 1, wherein transmitting the target phy address for the target phy comprises transmitting a last target phy address when the host address for the target phy is not received.
 6. A data storage device, comprising: a controller; a first phy and a second phy; a non-transitory computer readable storage medium containing instructions when executed by the controller cause the controller to: wait to receive a host address on the first phy; and transmit a phy address for the first phy after waiting to receive the host address on the first phy.
 7. The data storage device of claim 6, wherein instructions further cause the controller to receive the host address prior to transmitting the phy address.
 8. The data storage device of claim 7, wherein the instructions further cause the controller to match the received host address with a received host address on the second target phy, wherein the transmitted phy address for the first phy is a common phy address for the first phy and the second phy.
 9. The data storage device of claim 6, wherein the transmitted phy address is a common phy address for the first phy and for the second phy.
 10. The data storage device of claim 6, wherein the transmitted phy address for the first phy is a last phy address when the host address on the first phy is not received.
 11. A data storage device, comprising: a controller; a plurality of phys; and a means for determining a phy address to transmit during a SAS identification window to configure the phys into a wide port configuration.
 12. The data storage device of claim 11, wherein the determining means waits to receive a plurality of host addresses associated with the phys.
 13. The data storage device of claim 12, wherein the configuring means uses the received host addresses to configure the phys into the wide port configuration.
 14. The data storage device of claim 13, wherein the configuring means updates a lookup target identification table stored in non-volatile memory of the data storage device.
 15. The data storage device of claim 14, wherein the configuring means uses the updated lookup target identification table to configure the phys into the wide port configuration.
 16. A method of managing phys of a data storage target device, comprising: configuring a target port comprising a first target phy; and reconfiguring the target port comprising a first target phy and a second target phy.
 17. The method of claim 16, further comprising receiving a matching host address on the first target phy and on the second target phy.
 18. The method of claim 17, further comprising withholding transmission of a target identify frame until the matching host address is received.
 19. The method of claim 16, wherein the configured target port is a narrow port.
 20. The method of claim 16, wherein the configured target port is a wide port.
 21. A data storage device, comprising: a controller; a first phy and a second phy; a port; and a non-transitory computer readable storage medium containing instructions when executed by the controller cause the controller to: configure the port to comprise the first phy; and reconfigure the port to comprise the first phy and the second phy.
 22. The data storage device of claim 21, wherein the instructions further cause the controller to receive a matching host address on the first phy and on the second phy.
 23. The data storage device of claim 22, wherein the instructions further cause the controller to withhold transmission of an identify frame until the matching host address is received.
 24. The data storage device of claim 21, wherein the configured port is a narrow port.
 25. The data storage device of claim 21, wherein the configured port is a wide port.
 26. A data storage device, comprising: a controller; one or more ports; a plurality of phys; and a means for configuring the plurality of phys into a configuration selected from the group consisting of one of the following: (1) four narrow ports, (2) two narrow ports and one wide port, (3) one narrow and one wide port, (4) two wide ports, and (5) one wide port.
 27. The data storage device of claim 26, wherein the configuring means matches a received host address to determine the configuration.
 28. The data storage device of claim 26, wherein the configuring means updates a lookup table stored in non-volatile memory of the data storage device.
 29. The data storage device of claim 26, wherein the configuring means transmits the configuration after a reset of the phys. 